<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <link rel="stylesheet" href="/static/index/css/bootstrap.min.css">
        <link rel="stylesheet" href="/static/index/js/bootstrap.min.js">
        <link rel="stylesheet" href="/static/index/js/jquery-3.6.0.min.js">
        <script src="/static/sign/js/layer.js"></script>
        <script src="/static/sign/layui/layui.js"></script>
        <script src="/static/sign/js/jquery.js"></script>
        <link rel="stylesheet" href="/static/sign/layui/css/layui.css" media="all">
        <style type="text/css">
            html,body{
                width: 100%;
                height: 100%;
                margin: 0;
            }
        </style>
    </head>
<body>
<div style="margin-right: 15px">
    <!-- 内容主体区域 -->
    <div>
        当前位置：
        <span class="layui-breadcrumb" lay-separator=" > " style="visibility: visible;">
            <a href="{:url('admin/index/content')}">首页  >  </a>
            <a><cite>签到管理</cite></a>
        </span>
    </div>



    <table class="table">
        <thead>
            <tr>
                <th scope="col">序号</th>
                <th scope="col">签到Id</th>
                <th scope="col">签到课程</th>
                <th scope="col">结束时间</th>
                <th scope="col">签到详情</th>
                <th scope="col">签到状态</th>
                <th scope="col">执行操作</th>
            </tr>
        </thead>
        <tbody>
            {volist name='sign_list' id="sign_list" key="k"}
                <tr>
                    <th scope="row">{$k}</th>
                    <td>{$sign_list.Sign_id}</td>
                    <td>{$sign_list.Sign_course}</td>
                    <td>{$sign_list.Sign_endtime}</td>
                    <td>{$sign_list.Sign_hint}</td>
                    <td>{$sign_list.Sign_status}</td>
                    <td scope="row">
                        <button value="{$sign_list.Sign_id},{$sign_list.Sign_course}"  class="updToggle">签到</button>
                    </td>
                </tr>
            {/volist}
        </tbody>
    </table>
</div>

<!-- 签到信息弹出框表单 -->
<form action="{:url('signshow/dosign')}" method="POST" id="form">
    <div style='display:none;width:450px;height:370px;z-index:1000;position: fixed;top: 50%;left: 50%;background-color: #fff;
        box-shadow: 2px 0px 20px 0px;margin-top: -146px;margin-left: -250px;' id='update'>
        <div class="layui-layer-title" style='font-size: 20px; margin-left: 10px; margin-top: 10px;'>确认签到信息</div>
        <span class="layui-layer-setwin"><a class="layui-layer-ico layui-layer-close layui-layer-close1" href="javascript:;" onclick='updToggle()'></a></span>
        
            <div style='padding-right: 10px;padding-top: 10px'>
                <div class='layui-form-item'>
                    <label class='layui-form-label' style='width: 100px;'><span style='color:red'>*</span>签到id</label>
                    <div class='layui-input-block'>
                        <input type="text" lay-verify='title' autocomplete='off' placeholder='当前id' class="layui-input" id="id" name="id" value="{$sign_list.Sign_id}"  readonly >
                    </div>
                </div>            
                <div class='layui-form-item'>
                    <label class='layui-form-label' style='width: 100px;'><span style='color:red'>*</span>课程名称</label>
                    <div class='layui-input-block'>
                        <input type="text" lay-verify='title' autocomplete='off' placeholder='需要修改的编号' class="layui-input" id="coursename" name="coursename" value="{$sign_list.Sign_course}" readonly>
                    </div>
                </div>
                <div class='layui-form-item'>
                    <label class='layui-form-label' style='width: 100px;'><span style='color:red'>*</span>结束时间</label>
                    <div class='layui-input-block'>
                        <input type="text" lay-verify='title' autocomplete='off' placeholder='需要修改的编号' class="layui-input" id="time" name="time" value="{$sign_list.Sign_endtime}" readonly>
                    </div>
                </div>
                <div class='layui-form-item'>
                    <label class='layui-form-label' style='width: 100px;'><span style='color:red'>*</span>签到详情</label>
                    <div class='layui-input-block'>
                        <input type="text" lay-verify='title' autocomplete='off' placeholder='需要修改的编号' class="layui-input" id="hint" name="hint" value="{$sign_list.Sign_hint}" readonly>
                    </div>
                </div>
                <div class='layui-form-item'>
                    <label class='layui-form-label' style='width: 100px;'><span style='color:red'>*</span>签到状态</label>
                    <div class='layui-input-block'>
                        <input type="text" lay-verify='title' autocomplete='off' placeholder='需要修改的编号' class="layui-input" id="status" name="status" value="{$sign_list.Sign_status}" readonly>
                    </div>
                </div>
                


                <button type="button" class='layui-btn layui-btn-primary updToggle' style='float: right;'>取消</button>
                <input type="submit" class='layui-btn layui-btn-normal' id="submit" name="submit" style='float: right;margin-right: 10px'  value="确定签到">
            </div>
        
    </div>
</form>


<script>
        //JavaScript代码区域
        layui.use('element', function(){
        var element = layui.element;

    });

    // function updToggle(tit,url)
    // {
    //     $.dialog({
    //         title:tit,
    //         content:'url:'+url,
    //         fixed:false
    //     });
    // }

    $('.updToggle').click(function(tit,url) {
        $("#update").fadeToggle("slow")
        $("#layui-layer-shade1").fadeToggle()
        // var id
        // id = $(this).prop('value')
        // alert(id)
        // $('#id').val(id)

        // var coursename
        // //coursename = $(this).prop('value')
        // //alert(coursename)
        // $('#coursename').val(coursename)

        var data = $(this).prop('value')
        //alert(data)
        //console.log(data)



    })
</script>

</body>
</html>